function combinArr(arr1, arr2) {
    arr1.sort((a, b) => a - b)
    arr1.sort((a, b) => a - b)
    let l1 = 0;
    let l2 = 0;
    let result = []
    while (l1 < arr1.length && l2 < arr2.length) {
        if (arr1[l1] === arr2[l2]) {
            result.push(arr1[l1])
            l1++;
            l2++
        }
        if (arr1[l1] > arr2[l2]) {
            l2++
        }
        if (arr1[l1] < arr2[l2]) {
            l1++
        }

    }
    return result
}